Platform Explorer / Nuxeo Platform 2023.6

Component org.nuxeo.ecm.core.transientstore.TransientStorageComponent

Documentation

Provide a way to manage TransientStores where temporary data can be stored by key.

Resolution Order

137
The resolution order represents the order in which this component has been resolved by the Nuxeo Runtime framework.
You can influence this order by adding "require" tags in your component declaration, to make sure it is resolved after another component.

Start Order

823
The start order represents the order in which this component has been started by the Nuxeo Runtime framework.
This number is interesting to tweak if your Java component interacts with other components, and needs to be started before or after another one.
It can be changed by implementing the method "Component#getApplicationStartedOrder()" on your Java component: components are sorted according to this reference value, in increasing order.
The default value is 1000, and the repository initialization uses number 100. Negative values can also be used.

Implementation

Class: org.nuxeo.ecm.core.transientstore.TransientStorageComponent

Services

Extension Points

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.core.transientstore.TransientStorageComponent">

  <service>
    <provide interface="org.nuxeo.ecm.core.transientstore.api.TransientStoreService" />
  </service>

   <documentation>
    Provide a way to manage TransientStores where temporary data can be stored by key.
   </documentation>

  <implementation class="org.nuxeo.ecm.core.transientstore.TransientStorageComponent" />

  <extension-point name="store">

    <documentation>
    Allow to declare a transient store inside Nuxeo.
    The store is identified by a name and the descriptor has several parameters :

     <code>
       <store name="microStore">
          <!--  a store that can not store anything  -->
          <targetMaxSizeMB>0</targetMaxSizeMB>
          <absoluteMaxSizeMB>0</absoluteMaxSizeMB>
       </store>
     </code>

     The store tag supports 2 attributes:
     <ul>
         <li>name, that is used to identify the store</li>
         <li>class, that should reference an implementation of the TransientStoreProvider interface (will default to SimpleTransientStore))</li>
     </ul>

     Nested configuration elements are :
     <ul>
         <li>targetMaxSizeMB : target size that ideally should never be exceeded</li>
         <li>absoluteMaxSizeMB : size that must never be exceeded</li>
         <li>firstLevelTTL : TTL in minutes of the first level cache</li>
         <li>secondLevelTTL : TTL in minutes of the first level cache</li>
     </ul>

    </documentation>
    <object class="org.nuxeo.ecm.core.transientstore.api.TransientStoreConfig"/>

  </extension-point>

  <extension
    target="org.nuxeo.ecm.core.scheduler.SchedulerService"
    point="schedule">
    <schedule id="transientStoreGC">
      <eventId>transientStoreGCStart</eventId>
      <eventCategory>default</eventCategory>
      <!-- cleanup every 15 minutes -->
      <cronExpression>0 0/15 * * * ?</cronExpression>
    </schedule>
  </extension>

  <extension target="org.nuxeo.ecm.core.event.EventServiceComponent"
    point="listener">
    <listener name="transientStoreGCTrigger" async="false" postCommit="false"
      class="org.nuxeo.ecm.core.transientstore.TransientStorageGCTrigger">
      <event>transientStoreGCStart</event>
    </listener>
  </extension>

  <extension target="org.nuxeo.ecm.core.work.service" point="queues">
    <queue id="transientStorageGC">
      <name>Queue to run Transient Storage Garbage Collection Work</name>
      <maxThreads>${nuxeo.work.queue.transientStorageGC.threads:=1}</maxThreads>
      <category>transientStorageGC</category>
    </queue>
  </extension>

</component>